home *** CD-ROM | disk | FTP | other *** search
/ CSi Master: Ableton Live 5 / CSi Master: Ableton Live 5.iso / pc / rsrc / locrsrc / mtprsrc.dir / Internal_160_EX-Playbackbar Slider.ls < prev    next >
Encoding:
Text File  |  2005-10-31  |  1.5 KB  |  47 lines

  1. on mouseDown
  2.   global gQTcontrolRatio
  3.   puppetSound("QT click")
  4.   set the member of sprite 34 to member("standby...")
  5.   updateStage()
  6.   vOldMovieRate = sprite(46).movieRate
  7.   sprite(46).movieRate = 0
  8.   vControllerLength = the width of sprite 19 - (2 * 7)
  9.   repeat while the stillDown
  10.     vControllerPos = the mouseH - (the left of sprite 19 + 7)
  11.     if (vControllerPos > 0) and (vControllerPos <= vControllerLength) then
  12.       set the locH of sprite 31 to the left of sprite 19 + 6 + vControllerPos
  13.       sprite(46).mtime = vControllerPos * gQTcontrolRatio
  14.       vEndCatch = 0
  15.       updateStage()
  16.       next repeat
  17.     end if
  18.     if vControllerPos <= 0 then
  19.       set the locH of sprite 31 to the left of sprite 19 + 7
  20.       sprite(46).mtime = 0
  21.       vEndCatch = 0
  22.       updateStage()
  23.       next repeat
  24.     end if
  25.     set the locH of sprite 31 to the left of sprite 19 + 7 + vControllerLength
  26.     sprite(46).mtime = trackStopTime(sprite(46), 1)
  27.     vEndCatch = 1
  28.     updateStage()
  29.   end repeat
  30.   if (vControllerPos > 0) and (vControllerPos <= vControllerLength) then
  31.     sprite(46).mtime = vControllerPos * gQTcontrolRatio
  32.   else
  33.     if vControllerPos <= 0 then
  34.       sprite(46).mtime = 0
  35.     else
  36.       sprite(46).mtime = trackStopTime(sprite(46), 1)
  37.     end if
  38.   end if
  39.   if vEndCatch = 0 then
  40.     sprite(46).movieRate = vOldMovieRate
  41.   else
  42.     set the castNum of sprite 32 to the number of member "QT play"
  43.   end if
  44.   set the member of sprite 34 to member("blank command")
  45.   updateStage()
  46. end
  47.